<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 4.2.1">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/%E6%AD%A6%E6%B1%8932x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/%E6%AD%A6%E6%B1%8916x16.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib1/font-awesome/css/all.min.css">
  <link rel="stylesheet" href="/lib1/pace/pace-theme-center-simple.min.css">
  <script src="/lib1/pace/pace.min.js"></script>

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"example.com","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":true,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="词嵌入one-hot词向量构造起来很容易，但并不是一个含选择，因为其并不能准确地表达不同词之间的相似度，word2vec工具提出解决了上述问题，将每个词表示成一个定长的向量，并使这些向量能较好地表达不同词之间的相似和类比关系，包括跳字模型和连续词袋模型。 跳字模型跳字模型假设：基于某个词来生成它在文本序列周围的词。 在该模型中，每个词被分为2个d维向量，用来计算条件概率，假设该词在词典索引为i，当">
<meta property="og:type" content="article">
<meta property="og:title" content="自然语言处理">
<meta property="og:url" content="http://example.com/2020/08/29/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86/index.html">
<meta property="og:site_name" content="Technological Blog">
<meta property="og:description" content="词嵌入one-hot词向量构造起来很容易，但并不是一个含选择，因为其并不能准确地表达不同词之间的相似度，word2vec工具提出解决了上述问题，将每个词表示成一个定长的向量，并使这些向量能较好地表达不同词之间的相似和类比关系，包括跳字模型和连续词袋模型。 跳字模型跳字模型假设：基于某个词来生成它在文本序列周围的词。 在该模型中，每个词被分为2个d维向量，用来计算条件概率，假设该词在词典索引为i，当">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="http://example.com/image/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86/%E8%B7%B3%E5%AD%97%E6%A8%A1%E5%9E%8B%E6%9D%A1%E4%BB%B6%E6%A6%82%E7%8E%87.png">
<meta property="article:published_time" content="2020-08-29T11:02:46.000Z">
<meta property="article:modified_time" content="2021-11-03T08:23:47.154Z">
<meta property="article:author" content="Li Yudong">
<meta property="article:tag" content="机器学习初学">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://example.com/image/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86/%E8%B7%B3%E5%AD%97%E6%A8%A1%E5%9E%8B%E6%9D%A1%E4%BB%B6%E6%A6%82%E7%8E%87.png">

<link rel="canonical" href="http://example.com/2020/08/29/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>自然语言处理 | Technological Blog</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Technological Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">IT小白的成长之旅</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="main-menu menu">
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="user fa-fw"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="tags fa-fw"></i>标签<span class="badge">18</span></a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="th fa-fw"></i>分类<span class="badge">14</span></a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="archive fa-fw"></i>归档<span class="badge">95</span></a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>

  <a href="https://github.com/tiarmor1" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="http://example.com/2020/08/29/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/author.jpg">
      <meta itemprop="name" content="Li Yudong">
      <meta itemprop="description" content="">
    </span>
    
    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Technological Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          自然语言处理
        </h1>
    
        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-calendar"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>
    
              <time title="创建时间：2020-08-29 19:02:46" itemprop="dateCreated datePublished" datetime="2020-08-29T19:02:46+08:00">2020-08-29</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="far fa-calendar-check"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-11-03 16:23:47" itemprop="dateModified" datetime="2021-11-03T16:23:47+08:00">2021-11-03</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="far fa-folder"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/" itemprop="url" rel="index"><span itemprop="name">机器学习</span></a>
                </span>
            </span>
    
          
    
        </div>
      </header>
    
    
    
    
    <div class="post-body" itemprop="articleBody">
    
      
        <h2 id="词嵌入"><a href="#词嵌入" class="headerlink" title="词嵌入"></a>词嵌入</h2><p>one-hot词向量构造起来很容易，但并不是一个含选择，因为其并不能准确地表达不同词之间的相似度，word2vec工具提出解决了上述问题，将每个词表示成一个定长的向量，并使这些向量能较好地表达不同词之间的相似和类比关系，包括跳字模型和连续词袋模型。</p>
<h3 id="跳字模型"><a href="#跳字模型" class="headerlink" title="跳字模型"></a>跳字模型</h3><p>跳字模型假设：基于某个词来生成它在文本序列周围的词。</p>
<p>在该模型中，每个词被分为2个d维向量，用来计算条件概率，假设该词在词典索引为i，当它为中心词时向量表示为Vi，而它为背景词时向量表示为Ui。</p>
<p>设中心词Wc在词典中索引为c，背景词Wo在词典中索引为o，故给定中心词生成背景词的条件概率可以通过对向量内积做softmax运算而得到：<img src="/../../image/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86/%E8%B7%B3%E5%AD%97%E6%A8%A1%E5%9E%8B%E6%9D%A1%E4%BB%B6%E6%A6%82%E7%8E%87.png" alt="跳字模型条件概率"></p>
<p>跳字模型的参数是每个词所对应的中心词向量和背景词向量，训练中一般使用最大似然函数来学习模型参数</p>
<h3 id="连续词袋模型"><a href="#连续词袋模型" class="headerlink" title="连续词袋模型"></a>连续词袋模型</h3><p>与跳字模型不同的是，连续词袋模型假设：基于某中心词在文本序列前后的背景词来生成该中心词。因为连续词袋模型的背景词有很多个，因此将这些取平均，然后使用和跳字模型一样的方法来计算条件概率。</p>
<p>同样，连续词袋模型的最大似然估计等价于最小化损失函数。</p>
<h3 id="近似训练"><a href="#近似训练" class="headerlink" title="近似训练"></a>近似训练</h3><p>跳字模型的核心在于，使用softmax运算得到给定中间词Wc生成背景词Wo的条件概率，，该条件概率对应的对数损失；</p>
<p>由于softmax运算考虑背景词可能是词典中任一词，以上损失包含了词典大小数目的项的累加。因此每次梯度计算可能开销过大，有下面两种方法来进行近似训练。</p>
<p>负采样：修改了原来的目标函数，使用相互独立事件来构造损失函数，其训练中每一步梯度计算开销与采样的噪声词的个数线性相关。</p>
<p>层序softmax：使用了二叉树这一个数据结构，树的每个叶结点代表词典中的每个词，并根据根节点到叶节点的路径来构造损失函数，每一步的梯度计算开销与词典大小的对数相关。</p>
<h2 id="word2vec的实现"><a href="#word2vec的实现" class="headerlink" title="word2vec的实现"></a>word2vec的实现</h2><h3 id="预处理数据集"><a href="#预处理数据集" class="headerlink" title="预处理数据集"></a>预处理数据集</h3><p>PTB是常用的语料库</p>
<p>1、建立词语索引：将词映射到整数索引</p>
<p>2、二次采样：：文本中一般会出现一些高频词，而在背景窗口中，与高频词一起出现会更有益。故训练词嵌入模型时可以对词进行二次采样，即每个索引词都有一定概率被丢弃。</p>
<p>3、提取中心词与背景词：我们将与中心词距离不超过背景窗口大小的词作为背景词，定义函数提取出所有中心词和它们的背景词。它每次在整数1与max_window_size之间随机均匀采样一个整数作为背景窗口大小。</p>
<h3 id="负采样"><a href="#负采样" class="headerlink" title="负采样"></a>负采样</h3><h3 id="读取数据集"><a href="#读取数据集" class="headerlink" title="读取数据集"></a>读取数据集</h3><p>使用随机小批量来读取数据集，小批量读取函数batchify，其输入data是一个长度为批量大小的列表，其中每个元素分别包含中心词center、背景词context、噪声词negativ，其返回的小批量数据符合我们需要的格式。</p>
<h3 id="跳字模型-1"><a href="#跳字模型-1" class="headerlink" title="跳字模型"></a>跳字模型</h3><p>嵌入层：获取词嵌入的层称为嵌入层，在Gluon中可以通过创建nn.Embedding实例得到。其权重为一个矩阵，行数为词典大小、列数为每个词向量的维度。嵌入层输入为词的索引，返回为权重矩阵的第i行作为它的词向量。</p>
<p>小批量乘法：batch_dot对两个小批量中的矩阵一一做乘法。</p>
<p>跳字模型前向计算：输入包含中心词索引center以及连结的背景词与噪声词索引contexts_and_negatives。</p>
<p>定义损失函数：使用Gluon的二元交叉熵函数</p>
<h2 id="子词嵌入fastText"><a href="#子词嵌入fastText" class="headerlink" title="子词嵌入fastText"></a>子词嵌入fastText</h2><p>英语单词通常由其内部结构和形成方式，而在word2vec中，我们并没有直接利用构词学中信息，而在fastText中，每个中心词被表示为子词的集合，利用</p>
<h2 id="全局向量的词嵌入GloVe"><a href="#全局向量的词嵌入GloVe" class="headerlink" title="全局向量的词嵌入GloVe"></a>全局向量的词嵌入GloVe</h2><h2 id="文本分类情感分析：使用循环神经网络"><a href="#文本分类情感分析：使用循环神经网络" class="headerlink" title="文本分类情感分析：使用循环神经网络"></a>文本分类情感分析：使用循环神经网络</h2><p>文本分类是自然语言处理的一个常见任务，将一段不定长的文本序列变换成文本的类别。</p>
<p>子问题：使用文本情感分析来分析文本作者的情绪，即情感分析。</p>
<h2 id="文本情感分析：使用卷积神经网络textCNN"><a href="#文本情感分析：使用卷积神经网络textCNN" class="headerlink" title="文本情感分析：使用卷积神经网络textCNN"></a>文本情感分析：使用卷积神经网络textCNN</h2><p>其实，我们也可以将文本看作一维图像，从而可以使用一维卷积神经网络来捕捉临近词之间的关联，</p>
<h2 id="编码器-解码器Seq2seq"><a href="#编码器-解码器Seq2seq" class="headerlink" title="编码器-解码器Seq2seq"></a>编码器-解码器Seq2seq</h2><p>前面都是表征并变换了不定长的输入序列，但在自然语言处理的很多应用中，输入、输出都可以是不定长序列，此时可用编码、解码器或Seq2seq模型。两个模型的本质都用到了两个循环神经网络，分别为编码器、解码器。+</p>

    </div>
    
    
    
    
    <div>
      
        <div>
    
        <div style="text-align:center;color: #ccc;font-size:14px;">-------------本文结束<i class="fa fa-paw"></i>感谢您的阅读-------------</div>
    
</div>

      
    </div>
        <div class="reward-container">
  <div>坚持原创技术分享，您的支持将鼓励我继续创作！</div>
  <button onclick="var qr = document.getElementById('qr'); qr.style.display = (qr.style.display === 'none') ? 'block' : 'none';">
    打赏
  </button>
  <div id="qr" style="display: none;">
      
      <div style="display: inline-block;">
        <img src="/images/alipay.png" alt="Li Yudong 支付宝">
        <p>支付宝</p>
      </div>

  </div>
</div>

        

<div>
<ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者： </strong>Li Yudong
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="http://example.com/2020/08/29/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86/" title="自然语言处理">http://example.com/2020/08/29/机器学习/自然语言处理/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="noopener" target="_blank"><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！
  </li>
</ul>
</div>

    
      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0%E5%88%9D%E5%AD%A6/" rel="tag"># 机器学习初学</a>
          </div>
    
        

    
        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2020/08/28/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89/" rel="prev" title="计算机视觉">
      <i class="fa fa-chevron-left"></i> 计算机视觉
    </a></div>
      <div class="post-nav-item">
    <a href="/2020/09/02/%E5%89%8D%E7%AB%AF/html%E5%89%8D%E7%AB%AF%E5%BC%80%E5%8F%91/" rel="next" title="html">
      html <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#词嵌入"><span class="nav-number">1.</span> <span class="nav-text">词嵌入</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#跳字模型"><span class="nav-number">1.1.</span> <span class="nav-text">跳字模型</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#连续词袋模型"><span class="nav-number">1.2.</span> <span class="nav-text">连续词袋模型</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#近似训练"><span class="nav-number">1.3.</span> <span class="nav-text">近似训练</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#word2vec的实现"><span class="nav-number">2.</span> <span class="nav-text">word2vec的实现</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#预处理数据集"><span class="nav-number">2.1.</span> <span class="nav-text">预处理数据集</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#负采样"><span class="nav-number">2.2.</span> <span class="nav-text">负采样</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#读取数据集"><span class="nav-number">2.3.</span> <span class="nav-text">读取数据集</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#跳字模型-1"><span class="nav-number">2.4.</span> <span class="nav-text">跳字模型</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#子词嵌入fastText"><span class="nav-number">3.</span> <span class="nav-text">子词嵌入fastText</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#全局向量的词嵌入GloVe"><span class="nav-number">4.</span> <span class="nav-text">全局向量的词嵌入GloVe</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#文本分类情感分析：使用循环神经网络"><span class="nav-number">5.</span> <span class="nav-text">文本分类情感分析：使用循环神经网络</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#文本情感分析：使用卷积神经网络textCNN"><span class="nav-number">6.</span> <span class="nav-text">文本情感分析：使用卷积神经网络textCNN</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#编码器-解码器Seq2seq"><span class="nav-number">7.</span> <span class="nav-text">编码器-解码器Seq2seq</span></a></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <img class="site-author-image" itemprop="image" alt="Li Yudong"
      src="/images/author.jpg">
  <p class="site-author-name" itemprop="name">Li Yudong</p>
  <div class="site-description" itemprop="description"></div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">95</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">14</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">18</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author motion-element">
      <span class="links-of-author-item">
        <a href="https://github.com/tiarmor1" title="GitHub → https:&#x2F;&#x2F;github.com&#x2F;tiarmor1" rel="noopener" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
      </span>
      <span class="links-of-author-item">
        <a href="mailto:1157019137@qq.com" title="E-Mail → mailto:1157019137@qq.com" rel="noopener" target="_blank"><i class="fa fa-envelope fa-fw"></i>E-Mail</a>
      </span>
  </div>
  <div class="cc-license motion-element" itemprop="license">
    <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" rel="noopener" target="_blank"><img src="/images/cc-by-nc-sa.svg" alt="Creative Commons"></a>
  </div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 2020 – 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Li Yudong</span>
</div>

        








      </div>
    </footer>
  </div>

  
  
  <script color='0,0,0' opacity='0.5' zIndex='-1' count='150' src="/lib1/canvas-nest/canvas-nest.min.js"></script>
  <script src="/lib1/anime.min.js"></script>
  <script src="/lib1/velocity/velocity.min.js"></script>
  <script src="/lib1/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/pisces.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>













  

  

  
   <canvas class="fireworks" style="position: fixed;left: 0;top: 0;z-index: 1; pointer-events: none;" ></canvas> 
   <script type="text/javascript" src="//cdn.bootcss.com/animejs/2.2.0/anime.min.js"></script> 
   <script type="text/javascript" src="/js/fireworks.js"></script>
  
</body>
</html>

